package cn.itsource.system.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 实体类：
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Menu extends BaseDomain{

    private String name;
    private String component;
    private String url;
    private String icon;
    private Integer index;
    private Menu parent;
    private Long parentId;
    private String intro;
    private Boolean state;

    //当前对象的子菜单
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<>();

}
